<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>购物车</title>
    <link rel="stylesheet" href="../css/Shopping_Cart_Style.css">
    <script src="../js/Shopping_Cart.js"></script>
</head>

<body>
    <div id="add_items">
        <p>上架商品信息</p>
        商品名称 <input type="text" class="txt"> <br>
        商品单价 <input type="text" class="txt"> <br>
        上架数量 <input type="text" class="txt"> <br>
        上架颜色 <input type="text" class="txt"> <br>
        好评率&nbsp;&nbsp;&nbsp; <input type="text" class="txt"> <br>
        <button id="add_item_btn" onclick="addItem()">上架商品</button>
    </div>
    <div id="reduce_items">
        <p>下架商品信息</p>
        商品名称 <input type="text" class="txt"> <br>
        <button id="reduce_item_btn" onclick="reduceItem()">下架商品</button>
    </div>
    <div id="items_box">
        <table id="items_table">
            <caption>商品列表</caption>
            <thead>
                <th>商品名称</th>
                <th>单价(元)</th>
                <th>库存</th>
                <th>颜色</th>
                <th>好评率</th>
                <th>操作</th>
            </thead>
            <tbody class="items_box_tbody">
                <tr>
                    <td class="items_name">XiaoMI 13</td>
                    <td class="items_price">3999</td>
                    <td>4</td>
                    <td>紫色</td>
                    <td>99%</td>
                    <td>
                        <input type="button" class="add_cart" value="加入购物车" onclick="addCar(this)">
                        <input type="button" class="del_cart" value="删除" onclick="delItem(this)">
                    </td>
                </tr>
                <tr>
                    <td class="items_name">iphone 13</td>
                    <td class="items_price">4999</td>
                    <td>19</td>
                    <td>白色</td>
                    <td>98%</td>
                    <td>
                        <input type="button" class="add_cart" value="加入购物车" onclick="addCar(this)">
                        <input type="button" class="del_cart" value="删除" onclick="delItem(this)">
                    </td>
                </tr>
                <tr>
                    <td class="items_name">HuaWei P50</td>
                    <td class="items_price">5999</td>
                    <td>30</td>
                    <td>白色</td>
                    <td>100%</td>
                    <td>
                        <input type="button" class="add_cart" value="加入购物车" onclick="addCar(this)">
                        <input type="button" class="del_cart" value="删除" onclick="delItem(this)">
                    </td>
                </tr>
            </tbody>
            <tfoot>
                <tr>
                    <td colspan="6">
                        <input type="button" value="全选" id="select_all_items_btn" onclick="select_all_items_list(this)">
                    </td>
                </tr>
            </tfoot>
        </table>
    </div>
    <div id="cal_box">
        <table id="cal_table">
            <caption>购物车</caption>
            <thead>
                <th>
                    <input type="checkbox" id="select_all" class="select_all">全选
                </th>
                <th>商品名称</th>
                <th>商品单价</th>
                <th>数量</th>
                <th>金额</th>
                <th>操作</th>
            </thead>
            <tbody id="items">

            </tbody>
            <tfoot>
                <tr>
                    <td colspan="4">总计</td>
                    <td id="total">0</td>
                    <td>
                        <input type="button" value="去结算" id="submit" onclick="totalMoney()">
                    </td>
                </tr>
            </tfoot>
        </table>
    </div>
</body>

</html>